package com.project.bean;


import java.time.LocalDate;
import java.util.List;

public class SellBean {
    /**销售订单id*/
    private int id;
    /**客户*/
    private CustomerBean customer;
    /**送货地址*/
    private String address;
    /**订单总金额*/
    private int totalPrice;
    /**销售时间*/
    private LocalDate sellDate = LocalDate.now();
    /**销人员名字*/
    private String userName;
    /**销售明细集合*/
    private List<SellInfoBean> sellInfoList;



    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public CustomerBean getCustomer() {
        return customer;
    }

    public void setCustomer(CustomerBean customer) {
        this.customer = customer;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(int totalPrice) {
        this.totalPrice = totalPrice;
    }

    public LocalDate getSellDate() {
        return sellDate;
    }

    public void setSellDate(LocalDate sellDate) {
        this.sellDate = sellDate;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public List<SellInfoBean> getSellInfoList() {
        return sellInfoList;
    }

    public void setSellInfoList(List<SellInfoBean> sellInfoList) {
        this.sellInfoList = sellInfoList;
    }

    public SellBean() {
    }

    public SellBean(int customerId, String address, int totalPrice, LocalDate sellDate, String userName, List<SellInfoBean> sellInfoList) {
        this.customer = new CustomerBean();
        this.customer.setId(customerId);
        this.address = address;
        this.totalPrice = totalPrice;
        this.sellDate = sellDate;
        this.userName = userName;
        this.sellInfoList = sellInfoList;
    }

    @Override
    public String toString() {
        return "SellBean{" +
                "id=" + id +
                ", customer=" + customer +
                ", address='" + address + '\'' +
                ", totalPrice=" + totalPrice +
                ", sellDate=" + sellDate +
                ", userName='" + userName + '\'' +
                ", sellInfoList=" + sellInfoList +
                '}';
    }

}
